package com.mydemo.thread;

import java.util.concurrent.*;

public class ThreadPoolTest {
    public static void main(String[] args) throws InterruptedException {
        final Integer j  = 0;
        ExecutorService executorService = null;
        for (int i = 0; i < 100; i++) {
            executorService = new ThreadPoolExecutor(1, 5, 0L,
                    TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>());
            executorService.execute(() -> System.out.println(Thread.currentThread()));
            executorService.shutdown();
        }
        System.out.println("aaaa");
        System.out.println(executorService);
    }
}
